package com.wxx.design.simplefactory;

/**
 * @author: Jetwang
 * @date: 2022/4/8 21:29
 * @description: Test
 * @version: 1.0
 */
public class Test {
    public static void main(String[] args) {
        /*AbstractVideo video = new PythonVideo();
        AbstractVideo video01 = new JavaVideo();
        video.produce();
        video01.produce();*/

        /*
        使用工厂
         */
        /*AbstractVideo video02 = VideoFactory.getVideo("Java");
        if (video02 == null) {
            return;
        }
        video02.produce();*/

        AbstractVideo video = VideoFactory.getVideo(JavaVideo.class);
        if (video == null) {
            return;
        }
        video.produce();

    }
}
